window.shootPeople = window.shootPeople || {};
shootPeople.ShootPeople=function(){
    var s = this;
    annie.Sprite.call(s);
    /*_a2x_need_start*//*_a2x_need_end*/
    annie.initRes(s,"shootPeople","ShootPeople");
    var home = new shootPeople.Home(),
        gamePage = null,
        rankingPage = null,
        allRanking = null;
    s.addEventListener(annie.Event.ADD_TO_STAGE, function (e) {
        s.addChild(home)
    });
    annie.globalDispatcher.addEventListener("onJump", function (e) {
        s.removeAllChildren();
        var result = e.data;
        switch (result) {
            case "shootPeople.game":
                // if (!gamePage) {
                    gamePage = new shootPeople.Game();
                // }
                s.addChild(gamePage);
                break;
            case "shootPeople.home":
                if (!home) {
                    home = new shootPeople.Home()
                }
                s.addChild(home);
                break;
            case "shootPeople.Ranking":
                if (!rankingPage) {
                    rankingPage = new shootPeople.Ranking()
                }
                s.addChild(rankingPage);
                break;
            case "shootPeople.AllRanking":
                if (!allRanking) {
                    allRanking = new shootPeople.AllRanking()
                }
                s.addChild(allRanking);
                break;
        }
    })
};
A2xExtend(shootPeople.ShootPeople,annie.Sprite);
